Merge two if-blocks with same condition
authorKristian Rietveld <kris@gtk.org>
Sat, 16 Apr 2011 18:16:03 +0000 (20:16 +0200)
committerKristian Rietveld <kris@gtk.org>
Sat, 16 Apr 2011 18:16:03 +0000 (20:16 +0200)
gtk/gtktreeview.c

index ad951c3218e995be0c854b02dc057775d3d93f40..cb6cfe8128f963209cd276b71927e8b197c4f2cb 100644 (file)
@@ -2826,6 +2826,8 @@ gtk_tree_view_size_allocate (GtkWidget     *widget,
   
   if (gtk_widget_get_realized (widget))
     {
+      gboolean has_expand_column = FALSE;
+
       gdk_window_move_resize (gtk_widget_get_window (widget),
                              allocation->x, allocation->y,
                              allocation->width, allocation->height);
@@ -2842,11 +2844,7 @@ gtk_tree_view_size_allocate (GtkWidget     *widget,
 
       if (tree_view->priv->tree == NULL)
         invalidate_empty_focus (tree_view);
-    }
 
-  if (gtk_widget_get_realized (widget))
-    {
-      gboolean has_expand_column = FALSE;
       for (tmp_list = tree_view->priv->columns; tmp_list; tmp_list = tmp_list->next)
        {
          if (gtk_tree_view_column_get_expand (GTK_TREE_VIEW_COLUMN (tmp_list->data)))